package com.gjy.design.factory.simple;

/**
 * @author gjy
 * @version 1.0
 * @since 2025-11-10 11:11:14
 */
public final class LogisticsFactory {

    public static final String GROUND = "ground";
    public static final String SEA = "sea";

    private LogisticsFactory() {
    }

    public static Transport createTransport(String type) {
        switch (type) {
            case GROUND:
                return new Truck();
            case SEA:
                return new Ship();
            default:
                throw new IllegalArgumentException("未知运输类型: " + type);
        }
    }
}
